package cn.iocoder.yudao.module.system.job;

import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.job.TenantJob;
import cn.iocoder.yudao.module.system.service.partner.PartnerService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class PartnerCouponSendJob implements JobHandler {
    @Resource
    private PartnerService partnerService;

    @Override
    @TenantJob
    public String execute(String param) {
        int count = partnerService.sendPartnerCoupon(null);
        return StrUtil.format("发送合伙人优惠的合伙人有 {} 个", count);
    }

}
